var redis=require('redis');
var c=redis.createClient();

c.set('num','10',(err,data)=>{
    console.log('set:',err,data);
});
c.get('num',(err,data)=>{
    console.log('get:',err,data);
});

c.incr('num',(err,data)=>{
    console.log('incrby:',err,data);
});

c.incrby('num',5,(err,data)=>{
    console.log('incrby:',err,data);
});

c.incrby('num',-5,(err,data)=>{
    console.log('incrby:',err,data);
});

c.set('str3','old')
c.getset('str3','newStr3',(err,data)=>{
    console.log('getset:',err,data);
});

c.set('strRange','0123456789');
c.getrange('strRange',0,-1,(err,data)=>{
    console.log('getrange:',err,data);
});
c.getrange('strRange',2,3,(err,data)=>{
    console.log('getrange:',err,data);
});
